var BASE_URL = 'http://jinzhidata.com/v2'
$(function () {
    if (getCookie("accessToken")) {
        $.ajax({
            type: "get",
            url: BASE_URL + "/getUserInfo",
            contentType: 'application/json',
            dataType: "json",
            success: function (response) {
                if (response.code === 0) {
                    var data = response.data
                    $("#userPoints").html(data.userPoints)
                    $("#userAvatar").attr("src", data.userAvatar);
                }
            }
        })
    }

    $("#charge").click(function () {
        webCharge()
    });
})
